<template>
	<view class="JwarnMsg_wp" v-if="JmsgShow" @click="endMsg()">
		<view class="JwarnMsg_msg">
			<image @click="$navTo(JsrcLink.link)" :src="JsrcLink.thumb" mode="widthFix"></image>
			<text @click="endMsg()">×</text>
		</view>
	</view>
</template>

<script>
export default{
	props:{
		JmsgShow:{
			type:Boolean,
			default:true
		},
		JsrcLink:[Object,Number]
	},
	methods:{
		// 关闭弹框
		endMsg(){
			this.$emit('update:JmsgShow',false)
		}
	}
}
</script>

<style lang="scss">
.JwarnMsg_wp{
	background-color: rgba(0,0,0,0.5);
	position: fixed;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	z-index: 100;
}
.JwarnMsg_msg{
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	text-align: center;
	width: 100%;
}
.JwarnMsg_msg image{
	width: 90%;
}
.JwarnMsg_msg text{
	background-color: $base-color;
	border-radius: 50%;
	color: #fff;
	position: absolute;
	top: calc(var(--window-top) + 50upx);
	right: 4%;
	text-align: center;
	line-height: 50upx;
	height: 50upx;
	width: 50upx;
}
</style>
